package com.mysky.client.mvp.drove;

import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.ViewImpl;

public class DroveView extends ViewImpl implements DrovePresenter.MyView {
	public interface Binder extends UiBinder<Widget, DroveView> {
	}

	@Inject
	public DroveView(final Binder uiBinder) {
		initWidget(uiBinder.createAndBindUi(this));
	}

	@Override
	public void setInSlot(Object slot, Widget content) {
		if (slot == DrovePresenter.SLOT_AUDIO) {
			mediaPanel.clear();
			if (content != null)
				mediaPanel.add(content);
		} else {
			super.setInSlot(slot, content);
		}
	}

	@UiField
	HTMLPanel mediaPanel;

	@UiField
	Button sampleSongButton;

	@Override
	public Button getSampleSongButton() {
		return sampleSongButton;
	}
	
	@UiField
	Button sampleSong50Button;

	@Override
	public Button getSampleSong50Button() {
		return sampleSong50Button;
	}
}
